package com.eaoa.vo.pub;

import com.eaoa.vo.pub.base.BasePubCity;
import com.stony.core.util.LabelValue;



public class PubCity extends BasePubCity implements LabelValue ,Comparable{
	private static final long serialVersionUID = 1L;

/*[CONSTRUCTOR MARKER BEGIN]*/
	public PubCity () {
		super();
	}

	/**
	 * Constructor for primary key
	 */
	public PubCity (java.lang.Long cityno) {
		super(cityno);
	}

	/**
	 * Constructor for required fields
	 */
	public PubCity (
		java.lang.Long cityno,
		java.lang.String cityname) {

		super (
			cityno,
			cityname);
	}

/*[CONSTRUCTOR MARKER END]*/

	@Override
	public String getLabel() {
		return this.getCityname();
	}

	@Override
	public String getValue() {
		return this.getCityno().toString();
	}
	
	@Override
	public String getLabelshort() {
		return this.getCityno().toString();
	}
	
	@Override
	public int compareTo(Object arg0) {
		int result = 0;
		PubCity obj1 = this;
		PubCity obj2 = (PubCity) arg0;

		if (obj1 != null && obj2 !=null)
			result = obj1.getSort().compareTo( obj2.getSort());
		return result;
	}
}